<!doctype html>
<html class="no-js fixed-layout">
<head>
<% include("/common/shop_head.html"){}%>
</head>
<body>
<%include("/shop/header.html"){}%>
<div class="am-cf shop-main">
  <!-- content start -->
  <div class="shop-content">
    <div class="shop-content-body">
      <div class="am-margin am-text-xs">
        <div class="am-panel am-panel-default">
          <div class="am-panel-bd">
            <div class="am-text-warning am-text-lg"><span class="am-icon-check am-icon-lg">&nbsp;</span>&nbsp;&nbsp;&nbsp;&nbsp;您的订单已经成功提交！</div>
          </div>
        </div>
        <div class="am-panel am-panel-default">
          <div class="am-panel-hd">
            <h4 class="am-panel-title">
              订单信息
            </h4>
          </div>
          <div class="am-panel-bd am-g am-padding-0">
            <table class="am-table am-table-bordered am-table-compact am-text-nowrap am-margin-0">
              <tbody>
              <tr>
                <th>订单编号</th>
                <td>
                  ${order.orderSn}
                  <a class="am-badge am-badge-primary" href="${base}/shop/order/view?id=${order.id}">查看订单详情</a>
                </td>
              </tr>
              <tr>
                <th>订单总金额</th>
                <td>
                  <span class="am-text-danger">${order.totalAmount,orderUnitCurrencyFormat}</span>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div class="am-panel am-panel-default">
          <div class="am-panel-hd">
            <h4 class="am-panel-title">
              配送信息
            </h4>
          </div>
          <div class="am-panel-bd am-g am-padding-0">
            <table class="am-table am-table-bordered am-table-compact am-text-nowrap am-margin-0">
              <tbody>
              <tr>
                <th>配送方式</th>
                <td>
                  ${order.deliveryTypeName}
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div class="am-panel am-panel-default">
          <div class="am-panel-hd">
            <h4 class="am-panel-title">
              支付信息
            </h4>
          </div>
          <div class="am-panel-bd am-g am-padding-0">
            <table class="am-table am-table-bordered am-table-compact am-text-nowrap am-margin-0">
              <tbody>
              <tr>
                <th>支付方式</th>
                <td>
                  ${order.paymentConfigName}
                </td>
              </tr>
              <tr>
                <th></th>
                <td>
                  <%if (order.paymentConfig != null){%>
                  <form action="${base}/shop/payment/confirm" method="post">
                  <!-- 防止多次提交 -->
                  <%if (paymentConfig.paymentConfigType! == "deposit"){%>
                  <input type="hidden" name="paymentType" value="deposit" />
                  <%}else if (paymentConfig.paymentConfigType! == "offline"){%>
                  <input type="hidden" name="paymentType" value="offline" />
                  <%}else{%>
                  <input type="hidden" name="paymentType" value="online" />
                  <%}%>
                  <input type="hidden" name="order.id" value="${order.id}" />
                  <button type="submit" class="am-btn am-btn-primary am-btn-xs">立即支付</button>
                  </form>
                  <%}else{%>
                  <button type="button" class="am-btn am-btn-default am-btn-xs" onclick="window.location.href='${base}/'">确 定</button>
                  <%}%>
                </td>
              </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    <%include("/shop/footer.html"){}%>
  </div>
  <!-- content end -->
</div>
</body>
</html>